package com.chaomian.plus.starter.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Query基类 通用查询参数
 *
 * @author chaomian
 */
@Data
public class BaseQuery implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(required = false, value = "limit 用于列表查询数据量限制/分页查询不生效")
    private Long listLimit;

    @ApiModelProperty(required = false, value = "请求参数")
    private Map<String, Object> params;

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

}
